package com.geiv.backend.controller;

import com.geiv.backend.result.Student_BaseData;
import com.geiv.backend.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * FileName:StudentController
 * Author:  shadowsouls
 * Date:    2021/6/13 15:44
 * Description: 学生端的对外接口
 */
@RestController
@RequestMapping("student")
@CrossOrigin
public class StudentController {
    @Autowired
    StudentService service;

    @GetMapping("getBase/{id}")
    Student_BaseData getBaseData(@PathVariable String id){
        return service.getStudentDataBySid(id);
    }

    @GetMapping("login/{username}/{password}")
    String login(@PathVariable String password, @PathVariable String username){
        return service.studentLogin(username,password);
    }
}
